package Pojo;

/**
 * 成绩类
 * 
 * @author 吴春明
 * 
 */
public class ScoreCalc {
	public int java;// java成绩
	public int c;// C#成绩
	public int db;// DB成绩

	/**
	 * 计算总成绩
	 * 
	 * @return
	 */
	public int calcTotalScore() {
		int total = java + c + db;
		return total;
	}

	/**
	 * 显示总成绩
	 */
	public void showTotalScore() {
		System.out.println("总成绩是：" + calcTotalScore());
	}

	/**
	 * 计算平均成绩
	 * 
	 * @return
	 */
	public int calcAvg() {
		int avg = (java + c + db) / 3;
		return avg;
	}

	/**
	 * 显示平均成绩
	 */
	public void showAvg() {
		System.out.println("平均成绩是:" + calcAvg());
	}
}
